<?php

/**
* Content code
* @package congregation
* @Copyright (C) 12/04/2006 heriniaina.eugene
* @ All rights reserved
* @ Released copyrighted
* @version 0.1
**/

// ensure user has access to this function
if (!($acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'all' )
		| $acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'com_congregation' ))) {
	mosRedirect( 'index2.php', _NOT_AUTH );
}

require_once($mosConfig_absolute_path."/administrator/components/com_congregation/congregation.class.php");
require_once($mosConfig_absolute_path."/administrator/components/com_congregation/admin.congregation.html.php");


$task	= trim( mosGetParam( $_REQUEST, 'task'	,	""		) );
$option	= trim( mosGetParam( $_REQUEST, 'option',	""		) );
$rub	= trim( mosGetParam( $_REQUEST, 'rub'	,	""		) );
$lang	= trim( mosGetParam( $_REQUEST, 'lang'	,	"en"	) );
$username		= trim( mosGetParam( $_REQUEST, 'username'	,	""		) );

$p_id	= trim( mosGetParam( $_REQUEST, 'p_id'	,	""		) );
$c_id	= trim( mosGetParam( $_REQUEST, 'c_id'	,	""		) );
$id		= trim( mosGetParam( $_REQUEST, 'c_id'	,	0		) );

if (file_exists( $mosConfig_absolute_path . "/components/com_congregation/language/lang.".$lang.".php" )){
	include($mosConfig_absolute_path."/components/com_congregation/language/lang.".$lang.".php");
}else{
	include($mosConfig_absolute_path."/components/com_congregation/language/lang.en.php");
}



switch ($rub) {
	case 'necro':
		include( $mosConfig_absolute_path. "/administrator/components/com_congregation/includes/necro.admin.php");
		break;
	case 'status':
		include( $mosConfig_absolute_path. "/administrator/components/com_congregation/includes/status.admin.php");
		break;
	case 'province':
		include( $mosConfig_absolute_path. "/administrator/components/com_congregation/includes/province.admin.php");
		break;
	case 'casa':
		include( $mosConfig_absolute_path. "/administrator/components/com_congregation/includes/casa.admin.php");
		break;
	case "profile";
		include( $mosConfig_absolute_path. "/administrator/components/com_congregation/includes/profile.admin.php");
		break;
	case "help":
		HTML_congregation::help();
		break;
	default:
		HTML_congregation::panel();
		break;
}


